<?php
/**
 * 
 * @author hushuai
 *
 */
class ArtonceAction extends CommonAction{
	
	//根据cateid查找单页
	public function index(){
		
/* 		$Artonce       = D("Artonce");
		
		$map["cateid"] = $cateid ;
		$rows = $Artonce->where($map)->order("id desc")->find();
		$this->assign("detail",$rows);

		$cateid        = $this->_param("cateid","intval",0);
		$this->assign("cateid",$cateid); */
	
		$this->display();
	}
	
	//根据id查找单页
	public function detail(){
		
		$id      = $this->_param("id","intval",0);
		$Artonce = D("Artonce");
		
		$rows    = $Artonce->find($id);
		foreach($rows as $k=>$v){
			$this->assign("$k",$v);
		}
		
		$single  = find_thumb($rows['solevar'],'single');
		$this->assign("single",$single);
		
		$this->display();
	}
	
}
